#ifndef DISPLAYTHREAD_H
#define DISPLAYTHREAD_H
#include <QObject>
#include <QMutex>
#include <QImage>
#include "../DriverRepos/Graber/xfgraber.h"

class DisplayThread :public QObject
{
   Q_OBJECT
public:
    explicit DisplayThread(int devID);
    void closeThread();
    void pauseThread();
    void resumeThread();
    QMutex pause;
    void setXFGrabber(XFGraber *xfGraber) {
        this->xfGrabber = xfGraber;
    }
signals:
    void displayLiveImage(QImage);
public slots:
    void startThread();
    unsigned char* getRgb24Buffer();
private:
    volatile bool bloopFlag;
    unsigned char *m_pRgb24Buffer;
    int  m_devID;
    XFGraber *xfGrabber = nullptr;
};

#endif // DISPLAYTHREAD_H
